package com.wn.budget.model;

import com.wn.budget.code.BaseEntity;
import lombok.Data;

import javax.persistence.*;
import java.util.List;

/**
 * 模板
 *
 * @author : linyuebin
 * @date : 2019/11/7
 */
@Data
@Entity
public class Template extends BaseEntity {
    /**
     * 模板名称
     */
    @Column(length = 100)
    public String name;

    @Transient
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    @JoinColumn(name = "id")
    public List<TemplateSpace> templateSpaces;
}
